<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>改变盒子边框</title>
    <style>
        .big{
            width: 900px;
            height: 600px;
            margin: auto;
        }
        .big div{
            height: 150px;
            width: 150px;
            float: left;
            margin-left: -1px;          /*解决边框加粗的效果*/
            border: 1px solid red;
        }
        .big div:hover{
            border: 1px solid blue;
            position: relative;                 /*增加定位，浮动在其他图层上面*/
            z-index: 2;                         /*改变空间先后*/
        }
    </style>
</head>
<body>
    <div class="big">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </div>
</body>
</html>